<?php echo $this->render('header.phtml'); ?>
<h2><?php echo $this->escape($this->content_title);?></h2>
<table summary="Users" id="rounded-corner">
    <thead>
        <tr>
            <th class="rounded-company" scope="col"></th>
            <th class="rounded" scope="col">Имя</th>
            <th class="rounded" scope="col">E-mail</th>
            <th class="rounded" scope="col">Контакты</th>
            <th class="rounded" scope="col">Тел.</th>
            <th class="rounded" scope="col">Username</th>
            <th class="rounded" scope="col">Д/Р</th>
            <?php if($this->can_edit_user) { ?>
            <th class="rounded" scope="col">Edit</th>
            <?php } if($this->can_delete_user) { ?>
            <th class="rounded-q4" scope="col">Delete</th>
            <?php } ?>
        </tr>
    </thead>
    <!--<tfoot>
        <tr>
            <td class="rounded-foot-left" colspan="6"><em>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.</em></td>
            <td class="rounded-foot-right">&nbsp;</td>

        </tr>
    </tfoot>-->
    <tbody>
<?php foreach($this->users as $obj) : ?>
        <tr>
            <td><input type="checkbox" name=""></td>
            <?php if($this->can_edit_user) { ?>
            <td><a href="/user/edit/id/<?php echo $obj['id'] ?>"><?php echo $this->escape($obj['last_name']).' '.$this->escape($obj['first_name']);?></a>
            <?php } else { ?>
            <td><?php echo $this->escape($obj['last_name']).' '.$this->escape($obj['first_name']);?>
            <?php } ?>
            
            </td>
            <td><?php echo $this->escape($obj['email']);?></td>
            <td><?php echo $this->escape($obj['contacts']);?></td>
            <td><?php echo $this->escape($obj['phone']);?></td>
            <td><?php echo $this->escape($obj['username']);?></td>
            <td><?php echo $this->escape($obj['birthday']);?></td>
            <?php if($this->can_edit_user) { ?>
            <td><a href="/user/edit/id/<?php echo $obj['id'] ?>"><img border="0" title="" alt="" src="/public/images/user_edit.png"></a></td>
            <?php } if($this->can_delete_user) { ?>
            <td><a class="ask" href="/user/delete/id/<?php echo $obj['id'] ?>"><img border="0" title="" alt="" src="/public/images/trash.png"></a></td>
            <?php } ?>
        </tr>
<?php endforeach; ?>
               
    </tbody>
</table>
<?php if($this->can_add_user) { ?>
<a class="bt_green" href="/user/add"><span class="bt_green_lft"></span><strong>Add new item</strong><span class="bt_green_r"></span></a>
<?php } ?>
<?php echo $this->render('footer.phtml'); ?>
